/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * <p>Project: javase - List6
 * <p>Powered by webrx On 2021-12-09 09:34:57
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class List6 {
    public static void main(String[] args) {
        List<String> lan = new ArrayList<>(List.of("go", "c", "c++", "python", "java", "javascript", "vb", "vc"));
        System.out.println(lan);
        lan.sort(String::compareTo);
        System.out.println(lan);
        lan.sort(Comparator.reverseOrder());
        System.out.println(lan);
        Collections.shuffle(lan);
        System.out.println(lan);
    }
}
